<?php

/**
 * creditPage actions.
 *
 * @package    CeeVee
 * @subpackage creditPage
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class creditPageActions extends sfActions
{

  public function executeShow(sfWebRequest $request)
  {

        if ($this->getUser()->isFirstRequest())
        {
          $culture = $request->getPreferredCulture(array('de', 'en'));
          $this->getUser()->setCulture($culture);
          $this->getUser()->isFirstRequest(false);
        }
        else
        {
          $culture = $this->getUser()->getCulture();
        }
        $this->cp_credit_page = Doctrine_Query::create()
          ->from('cpCreditPage c')
          //->andWhere('c.id ='. $request->getParameter('id') )
          ->leftJoin('c.Translation t WITH t.lang = ?', $culture)
          ->execute();
        
        $this->forward404Unless($this->cp_credit_page);

    
  

    
  }

}
